/*
** my_str_concat.c for  in /home/georgi_v/rendu/PSU_2013_my_ls/libs
** 
** Made by georgi_v
** Login   <georgi_v@epitech.net>
** 
** Started on  Thu Nov  7 17:37:28 2013 georgi_v
** Last update Sun Nov 17 17:16:25 2013 georgi_v
*/

#include "my.h"

char    *my_str_concat(char *str1, char *str2)
{
  char	*ret;
  int	cnt1;
  int	cnt2;

  if ((ret = malloc(my_strlen(str1) + my_strlen(str2) + 1)) == NULL)
    return (NULL);
  cnt1 = 0;
  while (str1[cnt1])
    {
      ret[cnt1] = str1[cnt1];
      cnt1++;
    }
  cnt2 = 0;
  while (str2[cnt2])
    {
      ret[cnt1] = str2[cnt2];
      cnt1++;
      cnt2++;
    }
  ret[cnt1] = '\0';
  return (ret);
}
